import request from '/@/utils/request';

/**
 * 用户api接口集合
 * @method signIn 用户登录
 * @method signOut 用户退出登录
 */
export function useUserApi() {
	return {
		getUserList: (data: object) => {
			return request({
				url: '/api/admin/user_list' ,
				method: 'post',
				data
			});
		},
		getLoginUserInfo: (params?: object) => {
			return request({
				url: '/api/admin/login_user_info',
				method: 'get',
				params,
			});
		},
		addUser: (data: object) => {
			return request({
				url: '/api/admin/add_user',
				method: 'post',
				data
			});
		},
		editUser: (data: object) => {
			return request({
				url: '/api/admin/edit_user',
				method: 'post',
				data
			});
		},
		delUser: (data: object) => {
			return request({
				url: '/api/admin/del_user',
				method: 'post',
				data
			});
		},
	};
}
